package com.example.demo.study.studentmanagement2;

// 创建-学生类
public class Stundent {
    // 姓名、学号、年龄、班级等。
    private String name;
    private String studentId;
    private int age;
    private String className;
    // 构造函数、getter和setter方法
    public Stundent() {

    }
    public Stundent(String studentId,String name,int age, String className) {
        this.name = name;
        this.studentId = studentId;
        this.age = age;
        this.className = className;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @Override
    public String toString() {
        return "Stundent{" +
                "name='" + name + '\'' +
                ", studentId='" + studentId + '\'' +
                ", age=" + age +
                ", className='" + className + '\'' +
                '}';
    }
}
